package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

/**
* @author 马毅爽
* @description 针对表【shopping_cart(购物车)】的数据库操作Mapper
* @createDate 2023-11-09 11:33:13
* @Entity com.sky.entity.ShoppingCart
*/
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {

    List<ShoppingCart> list(ShoppingCart shoppingCart);

    @Delete("delete from shopping_cart where user_id = #{userId}")
    void removeByUserId(Long userId);

    void insertBatch(List<ShoppingCart> shoppingCarts);
}




